-
Notifications
You must be signed in to change notification settings - Fork 456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg: validate: validate Username not empty in ImageStatus #250
pkg: validate: validate Username not empty in ImageStatus #250
Conversation
👍 |
33877da
to
c817f49
Compare
@feiskyer @Random-Liu do you know why the test pull the image but show an empty Username field in status? |
@runcom 1002 is actually a Uid instead of username, could we change the validation to check Uid instead? |
Yup, blame on me |
We need a test for Username as well, I'll add one |
@feiskyer actually, there's no UID field in image status, that's why I was asking |
c817f49
to
c5e0aa9
Compare
blame on me again, I've fixed the PR, thanks! |
9713118
to
23d2b64
Compare
ready now |
Can we put the Dockerfile into this repo? I can build one and push to gcr kubernetes test image repo. |
Yup, I can do it, can we do the same for the PR I've opened in kubernetes/kubernetes as well? @Random-Liu |
23d2b64
to
718162d
Compare
@Random-Liu this PR now contains your PR #252 - I've added the Dockerfile under |
#252 is merged. Please update your PR and I'll review. :) |
718162d
to
6445f59
Compare
fdeed0e
to
ef01abf
Compare
@Random-Liu updated, please push test images on gcr.io or otherwise this will fail :) |
@@ -0,0 +1,24 @@ | |||
# Copyright 2018 The Kubernetes Authors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got this:
Makefile:23: *** non-numeric first argument to 'word' function: '{1..4}'. Stop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be fixed now.
ef01abf
to
98fcad9
Compare
@Random-Liu PTAL again please |
pkg/validate/image.go
Outdated
@@ -36,6 +37,15 @@ const ( | |||
|
|||
// digested reference for test image | |||
testImageWithDigest = "gcr.io/cri-tools/test-image-digest@sha256:9179135b4b4cc5a8721e09379244807553c318d92fa3111a65133241551ca343" | |||
|
|||
testImageUserUID = "gcr.io/cri-tools/test-user-uid" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/test-user-uid/test-image-user-uid
and also the following images.
pkg/validate/image.go
Outdated
}, | ||
{ | ||
description: "Username only", | ||
image: testImageUserUID, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
testImageUserUsername
@runcom Image pushed. |
Kubernetes rely on that Username field to provide RunAsUser, we need to validate runtimes correctly return it. We had recently an issue in CRI-O for that. Signed-off-by: Antonio Murdaca <[email protected]>
98fcad9
to
e082452
Compare
@Random-Liu took care of your comments and this is now green |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Kubernetes rely on that Username field to provide RunAsUser, we need to
validate runtimes correctly return it. We had recently an issue in
CRI-O for that.
@feiskyer @mrunalp PTAL
Signed-off-by: Antonio Murdaca [email protected]